<?php

namespace App\Repository\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;

/**
 * Class UserInvoice.
 *
 * @package namespace App\Repository\Models;
 */
class UserInvoice extends Model implements Transformable
{
    use TransformableTrait;
    use SoftDeletes;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['user_id', 'invoice_message', 'invoice_type', 'invoice_title', 'tax_code', 'invoice_address', 'invoice_tel', 'invoice_bank',
        'invoice_account', 'post_address', 'post_contacts', 'post_tel', 'is_default', 'remark'];

    public static $invoice_message_map = [
        1 => '个人',
        2 => '专用'
    ];

    public static $invoice_type_map = [
        1 => '普通发票',
        2 => '专用发票',
    ];

}
